package com.lw.jpa.dao;

import com.lw.jpa.domain.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

public interface UserDao extends JpaRepository<User,String>, JpaSpecificationExecutor<User> {
    /**
     * jpql形式查询
     */
    @Query("from User where username= ?1 ")
    User findByJpql(String username);
}
